package com.migu.rbac.thread;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description TODO :
 * @Author: zj
 * @Date: 16:27 2019/7/29
 * @Version 1.0
 **/
@Component
@EnableScheduling
public class JobTest {
    public static final Logger log = LoggerFactory.getLogger(JobTest.class);

    @Autowired
    Jobs dj;

    //@Scheduled(fixedRate = 1000)
    public void doTask() throws InterruptedException {
        log.info(Thread.currentThread().getName() + "===task run");
        for (int i = 0; i < 5; i++) {
          //  dj.tes14();
        }

        log.info(Thread.currentThread().getName() + "===task end");
    }

 //   @Scheduled(fixedRate = 1000)
    public void syncFile() {
        log.info(Thread.currentThread().getName() + "===syncFile");
    }


}
